<?php

/**
 * ProyectoCurricular form base class.
 *
 * @method ProyectoCurricular getObject() Returns the current form's model object
 *
 * @package    sibi-salud
 * @subpackage form
 * @author     SIBI <sibiud@gmail.com>
 */
abstract class BaseProyectoCurricularForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'          => new sfWidgetFormInputHidden(),
      'codigo'      => new sfWidgetFormInputText(),
      'nombre'      => new sfWidgetFormInputText(),
      'telefono'    => new sfWidgetFormInputText(),
      'fax'         => new sfWidgetFormInputText(),
      'correo'      => new sfWidgetFormInputText(),
      'facultad_id' => new sfWidgetFormPropelChoice(array('model' => 'Facultad', 'add_empty' => true)),
    ));

    $this->setValidators(array(
      'id'          => new sfValidatorPropelChoice(array('model' => 'ProyectoCurricular', 'column' => 'id', 'required' => false)),
      'codigo'      => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647, 'required' => false)),
      'nombre'      => new sfValidatorString(array('max_length' => 45)),
      'telefono'    => new sfValidatorString(array('max_length' => 45, 'required' => false)),
      'fax'         => new sfValidatorString(array('max_length' => 45, 'required' => false)),
      'correo'      => new sfValidatorString(array('max_length' => 45, 'required' => false)),
      'facultad_id' => new sfValidatorPropelChoice(array('model' => 'Facultad', 'column' => 'id', 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('proyecto_curricular[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'ProyectoCurricular';
  }


}
